-
Notifications
You must be signed in to change notification settings - Fork 51
Repair the non-share save Query option #392
base: develop
Are you sure you want to change the base?
Conversation
@@ -714,7 +714,7 @@ private function createUserQueryDB() | |||
|
|||
//domain of this db (needed?) | |||
$object['value'] = $this->_privateConfig->saving->baseQueryDbUri; | |||
$object['object_type'] = Erfurt_Store::TYPE_IRI; | |||
$object['type'] = 'iri'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to uri
TODOs (as discussed via Skype):
|
e2fe6e5
to
b0d23d2
Compare
Done @pfrischmuth |
@@ -408,7 +408,11 @@ public function savequeryAction() | |||
$res = "json or desc missing"; | |||
// checking for post data to save queries | |||
$params = $this->_request->getParams(); | |||
if (isset($params['json']) && isset($params['json'])) { | |||
$hasAC = !( | |||
empty(Erfurt_App::getInstance()->isActionAllowed('ModelManagement')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the call to empty
good for? The isActionAllowed
returns a bool.
Please also consider to check whether the current model is writable, for the "share with others" case (not sure whether this is currently checked somewhere, please verify).
@pfrischmuth isActionAllowed did return null as false in my tests. I doubt it is testet. I guess we should then add the case as well, that the user has no rights to create a knowledge base, but one for the user exists to save (created from the Admin for that purpose?). |
b0d23d2
to
6c88936
Compare
I added a case for non-writable db's, but I don't know how to make a db unwriteable, so I couldn't test the functionality. |
6c88936
to
2ec2ec1
Compare
Tested With Non-Editable, Editable, Without AC Rights, Without AC Rights with QDB and with AC Rights |
supported right now. This creates a db for users (with AC check) who are allowed to creade them, the checkbox is prechecked as most user won't have the permission to create their own dbs. Fixes Wrong Parameters and some Typos as well.
2ec2ec1
to
27b3784
Compare
@shinobu, please update the description of this issue/pull request,
|
This PR intends to fix the option to "not-share" private Queries in the Query Menu
The Option is in the Query Menu for a knowledge base. On the right side is a field to save a query with a checkbox to give the choice to share it or not. This checkbox had was ignored so far and checked or not didn't make a difference. All saved queries were saved in the same knowledge base and visible for everyone.
I expected them to be only visible for the creator (if the box was checked prior to saving).
I just fixed the errors in the existing implementation (the button was only deactivated in the
extensions/queries/resources/savepartial.js
) and added a proper authentication check.Now it creates properly an extra knowledge base for the user queries if he doesn't want do share them. This doesn't seem to be supported in the extensions that work with saved queries though. Hence i would say that we should probably think how and If we want to support this feature and add support for it in the extensions, that work with saved queries as needed.